<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Lang extends Lang_Controller
{
	function __construct()
	{
		parent::__construct();
	}

	function en() {
		$this->index('en_us');
	}
	
	function es() {
		$this->index('es_es');
	}
	
	function fr() {
		$this->index('fr_fr');
	}
	
	function index($lang) {

		$this->session->set_userdata(array('uilang' => $lang));
		
		set_cookie(array(
			'name' 		=> "uilang",
			'value'		=> $lang,
			'expire'	=> 60*60*24*31*12
		));
		
		redirect($this->session->userdata('callback_url'));
		
	}
}

/* End of file pages.php */
/* Location: ./application/controllers/lang.php */